use "exper_survey2021.dta", replace

*Table A2 summary stats
summ cm_treat pers_mask_future mask_mandate mask_comm_nolead_ind01 i.demrep3 i.race5 i.edu4 income age female state_restrict_ind, sep(0)
summ cm_treat pers_mask_future mask_mandate mask_comm_nolead_ind01 b2.demrep3 b2.race5 b2.edu4 income age female state_restrict_ind, sep(0)

*Table A3 - balance tests
tab age cm_treat, chi 
tab edu4 cm_treat, chi
tab female cm_treat, chi
tab income cm_treat, chi
tab race5 cm_treat, chi
tab demrep3 cm_treat, chi


*Figure 3 & Table A6 
*CM treatment significantly increases future mask wearing intentions
reg pers_mask_future cm_treat i.demrep3 i.race5 i.edu4 income age female state_restrict_ind 
outreg2 using taba6_experim, label word symbol(**,*,#) bdec(3) replace
margins, dydx(cm_treat) level(90) saving(experbehav1, replace)


reg pers_mask_future cm_treat##i.demrep3 i.race5 i.edu4 income age female state_restrict_ind 
outreg2 using taba6_experim, label word symbol(**,*,#) bdec(3) append
margins, dydx(cm_treat) at(demrep3=0) level(90) saving(experbehav2, replace)
margins, dydx(cm_treat) at(demrep3=1) level(90) saving(experbehav3, replace)
margins, dydx(cm_treat) at(demrep3=2) level(90) saving(experbehav4, replace)

reg mask_mandate cm_treat i.demrep3 i.race5 i.edu4 income age female state_restrict_ind 
outreg2 using taba6_experim, label word symbol(**,*,#) bdec(3) append
margins, dydx(cm_treat) level(90) saving(experattid1, replace)

reg mask_mandate cm_treat##i.demrep3 i.race5 i.edu4 income age female state_restrict_ind 
outreg2 using taba6_experim, label word symbol(**,*,#) bdec(3) append
margins, dydx(cm_treat) at(demrep3=0) level(90) saving(experattid2, replace)
margins, dydx(cm_treat) at(demrep3=1) level(90) saving(experattid3, replace)
margins, dydx(cm_treat) at(demrep3=2) level(90) saving(experattid4, replace)


clear all
use "experbehav1.dta", replace
append using experbehav2
append using experbehav3
append using experbehav4
save "experbehav14.dta", replace
clear all
use "experbehav14.dta"
gen nr=5-_n
twoway (rcap _ci_lb _ci_ub nr, hor) ///
	(scatter nr _margin), ///
	yscale(range(0.5 4.5)) ylabel(1 "Republicans" 2  "Independents" 3  "Democrats" 4 "All respondents", labsize(medsmall) angle(0)) ytitle("")  ///
		 xlabel() xtitle("Marginal effects of treatment", justification(right))  ///
	xline(0, lpattern(shortdash)) legend(off) title("Mask usage intentions", span size(medium)) scheme(s2mono) fxsize(130)
graph save exper_behav.gph, replace


clear all
use "experattid1.dta", replace
append using experattid2
append using experattid3
append using experattid4
gen nr=5-_n
save "experattid14.dta", replace
clear all
use "experattid14.dta"
twoway (rcap _ci_lb _ci_ub nr, hor) ///
	(scatter nr _margin), ///
	yscale(range(0.5 4.5)) ylabel(1 " " 2 " " 3 " " 4 " " , labsize(medsmall) angle(0)) ytitle("") ///
		 xlabel() xtitle("Marginal effects of treatment", justification(right))  ///
	xline(0, lpattern(shortdash)) legend(off) title("Mask mandate support", span size(medium)) scheme(s2mono) fxsize(95)
graph save "exper_attid", replace

graph combine "exper_behav" ///
"exper_attid", title("Fig.3:Local norms experiment effects") scheme(s2mono)
graph save Graph "fig3 experim results overview.gph"

note("The figure shows the marginal effect and 95% confidence intervals of the mask" ///
		"information treatment on mask usage intentions and mask mandate support for different" ///
		"groups. For full results see Table A6 in appendix ")



*Figure 4 & Table A7 Experiment results in low-mask states
use "C:\Users\gpop\Dropbox (Princeton)\covid\Manuscript\PoP final submission files\exper_survey2021.dta"
reg pers_mask_future cm_treat i.demrep3 i.race5 i.edu4 income age female state_restrict_ind if state_mask_freq<.873
outreg2 using taba7_experim_lomask, label word symbol(**,*,#) bdec(3) replace
margins, dydx(cm_treat) level(90) saving(experbehav1_lms, replace)

reg pers_mask_future cm_treat##i.demrep3 i.race5 i.edu4 income age female state_restrict_ind  if state_mask_freq<.873
outreg2 using taba7_experim_lomask, label word symbol(**,*,#) bdec(3) append
margins, dydx(cm_treat) at(demrep3=0) level(90) saving(experbehav2_lms, replace)
margins, dydx(cm_treat) at(demrep3=1) level(90) saving(experbehav3_lms, replace)
margins, dydx(cm_treat) at(demrep3=2) level(90) saving(experbehav4_lms, replace)

reg mask_mandate cm_treat i.demrep3 i.race5 i.edu4 income age female state_restrict_ind if state_mask_freq<.873
outreg2 using taba7_experim_lomask, label word symbol(**,*,#) bdec(3) append
margins, dydx(cm_treat) level(90) saving(experattid1_lms, replace)

reg mask_mandate cm_treat##i.demrep3 i.race5 i.edu4 income age female state_restrict_ind if state_mask_freq<.873
outreg2 using taba7_experim_lomask, label word symbol(**,*,#) bdec(3) append
margins, dydx(cm_treat) at(demrep3=0) level(90) saving(experattid2_lms, replace)
margins, dydx(cm_treat) at(demrep3=1) level(90) saving(experattid3_lms, replace)
margins, dydx(cm_treat) at(demrep3=2) level(90) saving(experattid4_lms, replace)


clear all
use "experbehav1_lms.dta", replace
append using experbehav2_lms
append using experbehav3_lms
append using experbehav4_lms
save "experbehav14_lms.dta", replace
clear all
use "experbehav14_lms.dta"
gen nr=5-_n
twoway (rcap _ci_lb _ci_ub nr, hor) ///
	(scatter nr _margin), ///
	yscale(range(0.5 4.5)) ylabel(1 "Republicans" 2  "Independents" 3  "Democrats" 4 "All respondents", labsize(medsmall) angle(0)) ytitle("")  ///
		 xlabel() xtitle("Marginal effects of treatment", justification(right))  ///
	xline(0, lpattern(shortdash)) legend(off) title("Mask usage intentions", span size(medium)) scheme(s2mono) fxsize(130)
graph save exper_behav_lms.gph, replace

clear all
use "experattid1_lms.dta", replace
append using experattid2_lms
append using experattid3_lms
append using experattid4_lms
gen nr=5-_n
save "experattid14_lms.dta", replace
clear all
use "experattid14_lms.dta"
twoway (rcap _ci_lb _ci_ub nr, hor) ///
	(scatter nr _margin), ///
	yscale(range(0.5 4.5)) ylabel(1 " " 2 " " 3 " " 4 " " , labsize(medsmall) angle(0)) ytitle("") ///
		 xlabel() xtitle("Marginal effects of treatment", justification(right))  ///
	xline(0, lpattern(shortdash)) legend(off) title("Mask mandate support", span size(medium)) scheme(s2mono) fxsize(95)
graph save "exper_attid_lms", replace

graph combine "exper_behav_lms" ///
"exper_attid_lms", title("Fig.4:Local norms experiment effects in low-mask states") scheme(s2mono)
graph save Graph "fig4 experim results LMS.gph", replace

///note("The figure shows the marginal effect and 95% confidence intervals of the mask information treatment on mask usage intentions and mask mandate support for different groups. For full results see Table A7 in appendix")

clear all
use "exper_survey2021.dta"
reg mask_comm_nolead_ind01 cm_treat i.demrep3 i.race5 i.edu4 income age female state_restrict_ind if state_mask_freq<.873
outreg2 using taba7_experim_lomask, label word symbol(**,*,#) bdec(3) append

reg mask_comm_nolead_ind01 cm_treat##i.demrep3 i.race5 i.edu4 income age female state_restrict_ind  if state_mask_freq<.873
outreg2 using taba7_experim_lomask, label word symbol(**,*,#) bdec(3) append

*Table A10 Norm enforcement

reg confront_mask cm_treat i.edu4 i.demrep3 income female age i.race5  state_restrict_ind 
outreg2 using taba10_normenforce, label word symbol(**,*,#) bdec(3) replace

reg confront_mask_vlikely cm_treat i.edu4 i.demrep3 income female age i.race5  state_restrict_ind 
outreg2 using taba10_normenforce, label word symbol(**,*,#) bdec(3) append

reg confront_mask_vlikely cm_treat##edu4 i.demrep3 income female age i.race5 state_restrict_ind 
outreg2 using taba10_normenforce, label word symbol(**,*,#) bdec(3) append

reg confront_mask_vlikely cm_treat##female i.demrep3 income age i.race5 i.edu4 state_restrict_ind 
outreg2 using taba10_normenforce, label word symbol(**,*,#) bdec(3) append

reg confront_mask_vlikely cm_treat##i.race5 i.demrep3 income female age i.edu4 state_restrict_ind 
outreg2 using taba10_normenforce, label word symbol(**,*,#) bdec(3) append


